﻿using System.Linq;

namespace FastestWays.Helpers.Voice
{
    public class VoiceString
    {
        public string Words { get; set; }
        public int NumberOfArgs { get; set; }

        public VoiceString()
        {
            NumberOfArgs = 0;
        }

        public string GetFormattedVoiceString(object[] args = null)
        {
            if (args != null && NumberOfArgs == args.Count())
            {
                if (NumberOfArgs == 1)
                {
                    return string.Format(Words, args[0]);
                }
                else
                {
                    return string.Empty;
                }
            }
            if (NumberOfArgs == 0)
            {
                return Words;
            }
            return string.Empty;
        }
    }
}